09. Collecting Click Locations

Collecting Click Locations

Question:

Start Quiz:

Solution:

INSTRUCTOR NOTE:

Here's the code shell for you:

$(document).click(function(loc) {
  // your code goes here
});




$(document).click()

$(document).click() is a jQuery event handler on the page, which is a fancy way of saying that it will hold some code that runs every time a user clicks on the page.
The function (that doesn't have a name, making it an anonymous function) that gets passed into .click() will be run every time a user clicks on the page.



loc

loc is a jQuery event object that contains information about the click event. Learn about event's properties with jQuery's documentation.



For this quiz you'll be working with the index.htmland js/resumeBuilder.js files from the résumé project's Github repository you downloaded earlier in this lesson. You will edit and save js/resumeBuilder.js in your text editor, and view the results by opening index.html in the browser of your choice. It may help you to also view the logClicks(x,y) function in the js/helper.js file.



Follow your instructors!

@cwpittman

+jameswilliams